unit configForm;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, common, model;

type
  TFormConfig = class(TForm)
    lbl1: TLabel;
    edtSiteUrl: TEdit;
    btnConfirm: TButton;
    procedure btnConfirmClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    cfgTable: TConfigureTable;
  public
    { Public declarations }
  end;

var
  FormConfig: TFormConfig;

implementation

{$R *.dfm}

procedure TFormConfig.btnConfirmClick(Sender: TObject);
begin
  cfgTable.SetVal('site_url',Trim(edtSiteUrl.Text));
  _SITE_URL:=cfgTable.GetVal('site_url');
  Close;
end;

procedure TFormConfig.FormCreate(Sender: TObject);
begin
  cfgTable:=TConfigureTable.Create;
  edtSiteUrl.Text:=cfgTable.GetVal('site_url');
end;

end.
